<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>chpsvx.f</title>
 <meta name="generator" content="emacs 21.3.1; htmlfontify 0.20">
<style type="text/css"><!-- 
body { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.default   { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.default a { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
span.string   { color: rgb(188, 143, 143);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.string a { color: rgb(188, 143, 143);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
span.comment   { color: rgb(178, 34, 34);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.comment a { color: rgb(178, 34, 34);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
 --></style>

 </head>
  <body>

<pre>
      SUBROUTINE <a name="CHPSVX.1"></a><a href="chpsvx.f.html#CHPSVX.1">CHPSVX</a>( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X,
     $                   LDX, RCOND, FERR, BERR, WORK, RWORK, INFO )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  -- LAPACK driver routine (version 3.1) --
</span><span class="comment">*</span><span class="comment">     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
</span><span class="comment">*</span><span class="comment">     November 2006
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. Scalar Arguments ..
</span>      CHARACTER          FACT, UPLO
      INTEGER            INFO, LDB, LDX, N, NRHS
      REAL               RCOND
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      INTEGER            IPIV( * )
      REAL               BERR( * ), FERR( * ), RWORK( * )
      COMPLEX            AFP( * ), AP( * ), B( LDB, * ), WORK( * ),
     $                   X( LDX, * )
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Purpose
</span><span class="comment">*</span><span class="comment">  =======
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  <a name="CHPSVX.23"></a><a href="chpsvx.f.html#CHPSVX.1">CHPSVX</a> uses the diagonal pivoting factorization A = U*D*U**H or
</span><span class="comment">*</span><span class="comment">  A = L*D*L**H to compute the solution to a complex system of linear
</span><span class="comment">*</span><span class="comment">  equations A * X = B, where A is an N-by-N Hermitian matrix stored
</span><span class="comment">*</span><span class="comment">  in packed format and X and B are N-by-NRHS matrices.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Error bounds on the solution and a condition estimate are also
</span><span class="comment">*</span><span class="comment">  provided.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Description
</span><span class="comment">*</span><span class="comment">  ===========
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  The following steps are performed:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  1. If FACT = 'N', the diagonal pivoting method is used to factor A as
</span><span class="comment">*</span><span class="comment">        A = U * D * U**H,  if UPLO = 'U', or
</span><span class="comment">*</span><span class="comment">        A = L * D * L**H,  if UPLO = 'L',
</span><span class="comment">*</span><span class="comment">     where U (or L) is a product of permutation and unit upper (lower)
</span><span class="comment">*</span><span class="comment">     triangular matrices and D is Hermitian and block diagonal with
</span><span class="comment">*</span><span class="comment">     1-by-1 and 2-by-2 diagonal blocks.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  2. If some D(i,i)=0, so that D is exactly singular, then the routine
</span><span class="comment">*</span><span class="comment">     returns with INFO = i. Otherwise, the factored form of A is used
</span><span class="comment">*</span><span class="comment">     to estimate the condition number of the matrix A.  If the
</span><span class="comment">*</span><span class="comment">     reciprocal of the condition number is less than machine precision,
</span><span class="comment">*</span><span class="comment">     INFO = N+1 is returned as a warning, but the routine still goes on
</span><span class="comment">*</span><span class="comment">     to solve for X and compute error bounds as described below.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  3. The system of equations is solved for X using the factored form
</span><span class="comment">*</span><span class="comment">     of A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  4. Iterative refinement is applied to improve the computed solution
</span><span class="comment">*</span><span class="comment">     matrix and calculate error bounds and backward error estimates
</span><span class="comment">*</span><span class="comment">     for it.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Arguments
</span><span class="comment">*</span><span class="comment">  =========
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  FACT    (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          Specifies whether or not the factored form of A has been
</span><span class="comment">*</span><span class="comment">          supplied on entry.
</span><span class="comment">*</span><span class="comment">          = 'F':  On entry, AFP and IPIV contain the factored form of
</span><span class="comment">*</span><span class="comment">                  A.  AFP and IPIV will not be modified.
</span><span class="comment">*</span><span class="comment">          = 'N':  The matrix A will be copied to AFP and factored.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  UPLO    (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          = 'U':  Upper triangle of A is stored;
</span><span class="comment">*</span><span class="comment">          = 'L':  Lower triangle of A is stored.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  N       (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The number of linear equations, i.e., the order of the
</span><span class="comment">*</span><span class="comment">          matrix A.  N &gt;= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  NRHS    (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The number of right hand sides, i.e., the number of columns
</span><span class="comment">*</span><span class="comment">          of the matrices B and X.  NRHS &gt;= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  AP      (input) COMPLEX array, dimension (N*(N+1)/2)
</span><span class="comment">*</span><span class="comment">          The upper or lower triangle of the Hermitian matrix A, packed
</span><span class="comment">*</span><span class="comment">          columnwise in a linear array.  The j-th column of A is stored
</span><span class="comment">*</span><span class="comment">          in the array AP as follows:
</span><span class="comment">*</span><span class="comment">          if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1&lt;=i&lt;=j;
</span><span class="comment">*</span><span class="comment">          if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j&lt;=i&lt;=n.
</span><span class="comment">*</span><span class="comment">          See below for further details.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  AFP     (input or output) COMPLEX array, dimension (N*(N+1)/2)
</span><span class="comment">*</span><span class="comment">          If FACT = 'F', then AFP is an input argument and on entry
</span><span class="comment">*</span><span class="comment">          contains the block diagonal matrix D and the multipliers used
</span><span class="comment">*</span><span class="comment">          to obtain the factor U or L from the factorization
</span><span class="comment">*</span><span class="comment">          A = U*D*U**H or A = L*D*L**H as computed by <a name="CHPTRF.91"></a><a href="chptrf.f.html#CHPTRF.1">CHPTRF</a>, stored as
</span><span class="comment">*</span><span class="comment">          a packed triangular matrix in the same storage format as A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">          If FACT = 'N', then AFP is an output argument and on exit
</span><span class="comment">*</span><span class="comment">          contains the block diagonal matrix D and the multipliers used
</span><span class="comment">*</span><span class="comment">          to obtain the factor U or L from the factorization
</span><span class="comment">*</span><span class="comment">          A = U*D*U**H or A = L*D*L**H as computed by <a name="CHPTRF.97"></a><a href="chptrf.f.html#CHPTRF.1">CHPTRF</a>, stored as
</span><span class="comment">*</span><span class="comment">          a packed triangular matrix in the same storage format as A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  IPIV    (input or output) INTEGER array, dimension (N)
</span><span class="comment">*</span><span class="comment">          If FACT = 'F', then IPIV is an input argument and on entry
</span><span class="comment">*</span><span class="comment">          contains details of the interchanges and the block structure
</span><span class="comment">*</span><span class="comment">          of D, as determined by <a name="CHPTRF.103"></a><a href="chptrf.f.html#CHPTRF.1">CHPTRF</a>.
</span><span class="comment">*</span><span class="comment">          If IPIV(k) &gt; 0, then rows and columns k and IPIV(k) were
</span><span class="comment">*</span><span class="comment">          interchanged and D(k,k) is a 1-by-1 diagonal block.
</span><span class="comment">*</span><span class="comment">          If UPLO = 'U' and IPIV(k) = IPIV(k-1) &lt; 0, then rows and
</span><span class="comment">*</span><span class="comment">          columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
</span><span class="comment">*</span><span class="comment">          is a 2-by-2 diagonal block.  If UPLO = 'L' and IPIV(k) =
</span><span class="comment">*</span><span class="comment">          IPIV(k+1) &lt; 0, then rows and columns k+1 and -IPIV(k) were
</span><span class="comment">*</span><span class="comment">          interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">          If FACT = 'N', then IPIV is an output argument and on exit
</span><span class="comment">*</span><span class="comment">          contains details of the interchanges and the block structure
</span><span class="comment">*</span><span class="comment">          of D, as determined by <a name="CHPTRF.114"></a><a href="chptrf.f.html#CHPTRF.1">CHPTRF</a>.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  B       (input) COMPLEX array, dimension (LDB,NRHS)
</span><span class="comment">*</span><span class="comment">          The N-by-NRHS right hand side matrix B.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDB     (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of the array B.  LDB &gt;= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  X       (output) COMPLEX array, dimension (LDX,NRHS)
</span><span class="comment">*</span><span class="comment">          If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDX     (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of the array X.  LDX &gt;= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  RCOND   (output) REAL
</span><span class="comment">*</span><span class="comment">          The estimate of the reciprocal condition number of the matrix
</span><span class="comment">*</span><span class="comment">          A.  If RCOND is less than the machine precision (in
</span><span class="comment">*</span><span class="comment">          particular, if RCOND = 0), the matrix is singular to working
</span><span class="comment">*</span><span class="comment">          precision.  This condition is indicated by a return code of
</span><span class="comment">*</span><span class="comment">          INFO &gt; 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  FERR    (output) REAL array, dimension (NRHS)
</span><span class="comment">*</span><span class="comment">          The estimated forward error bound for each solution vector
</span><span class="comment">*</span><span class="comment">          X(j) (the j-th column of the solution matrix X).
</span><span class="comment">*</span><span class="comment">          If XTRUE is the true solution corresponding to X(j), FERR(j)
</span><span class="comment">*</span><span class="comment">          is an estimated upper bound for the magnitude of the largest
</span><span class="comment">*</span><span class="comment">          element in (X(j) - XTRUE) divided by the magnitude of the
</span><span class="comment">*</span><span class="comment">          largest element in X(j).  The estimate is as reliable as
</span><span class="comment">*</span><span class="comment">          the estimate for RCOND, and is almost always a slight
</span><span class="comment">*</span><span class="comment">          overestimate of the true error.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  BERR    (output) REAL array, dimension (NRHS)
</span><span class="comment">*</span><span class="comment">          The componentwise relative backward error of each solution
</span><span class="comment">*</span><span class="comment">          vector X(j) (i.e., the smallest relative change in
</span><span class="comment">*</span><span class="comment">          any element of A or B that makes X(j) an exact solution).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  WORK    (workspace) COMPLEX array, dimension (2*N)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  RWORK   (workspace) REAL array, dimension (N)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  INFO    (output) INTEGER
</span><span class="comment">*</span><span class="comment">          = 0: successful exit
</span><span class="comment">*</span><span class="comment">          &lt; 0: if INFO = -i, the i-th argument had an illegal value
</span><span class="comment">*</span><span class="comment">          &gt; 0:  if INFO = i, and i is
</span><span class="comment">*</span><span class="comment">                &lt;= N:  D(i,i) is exactly zero.  The factorization
</span><span class="comment">*</span><span class="comment">                       has been completed but the factor D is exactly
</span><span class="comment">*</span><span class="comment">                       singular, so the solution and error bounds could
</span><span class="comment">*</span><span class="comment">                       not be computed. RCOND = 0 is returned.
</span><span class="comment">*</span><span class="comment">                = N+1: D is nonsingular, but RCOND is less than machine
</span><span class="comment">*</span><span class="comment">                       precision, meaning that the matrix is singular
</span><span class="comment">*</span><span class="comment">                       to working precision.  Nevertheless, the
</span><span class="comment">*</span><span class="comment">                       solution and error bounds are computed because
</span><span class="comment">*</span><span class="comment">                       there are a number of situations where the
</span><span class="comment">*</span><span class="comment">                       computed solution can be more accurate than the
</span><span class="comment">*</span><span class="comment">                       value of RCOND would suggest.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Further Details
</span><span class="comment">*</span><span class="comment">  ===============
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  The packed storage scheme is illustrated by the following example
</span><span class="comment">*</span><span class="comment">  when N = 4, UPLO = 'U':
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Two-dimensional storage of the Hermitian matrix A:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     a11 a12 a13 a14
</span><span class="comment">*</span><span class="comment">         a22 a23 a24
</span><span class="comment">*</span><span class="comment">             a33 a34     (aij = conjg(aji))
</span><span class="comment">*</span><span class="comment">                 a44
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Packed storage of the upper triangle of A:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  =====================================================================
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. Parameters ..
</span>      REAL               ZERO
      PARAMETER          ( ZERO = 0.0E+0 )
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Local Scalars ..
</span>      LOGICAL            NOFACT
      REAL               ANORM
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Functions ..
</span>      LOGICAL            <a name="LSAME.198"></a><a href="lsame.f.html#LSAME.1">LSAME</a>
      REAL               <a name="CLANHP.199"></a><a href="clanhp.f.html#CLANHP.1">CLANHP</a>, <a name="SLAMCH.199"></a><a href="slamch.f.html#SLAMCH.1">SLAMCH</a>
      EXTERNAL           <a name="LSAME.200"></a><a href="lsame.f.html#LSAME.1">LSAME</a>, <a name="CLANHP.200"></a><a href="clanhp.f.html#CLANHP.1">CLANHP</a>, <a name="SLAMCH.200"></a><a href="slamch.f.html#SLAMCH.1">SLAMCH</a>
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Subroutines ..
</span>      EXTERNAL           CCOPY, <a name="CHPCON.203"></a><a href="chpcon.f.html#CHPCON.1">CHPCON</a>, <a name="CHPRFS.203"></a><a href="chprfs.f.html#CHPRFS.1">CHPRFS</a>, <a name="CHPTRF.203"></a><a href="chptrf.f.html#CHPTRF.1">CHPTRF</a>, <a name="CHPTRS.203"></a><a href="chptrs.f.html#CHPTRS.1">CHPTRS</a>, <a name="CLACPY.203"></a><a href="clacpy.f.html#CLACPY.1">CLACPY</a>,
     $                   <a name="XERBLA.204"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</a>
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Intrinsic Functions ..
</span>      INTRINSIC          MAX
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Executable Statements ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     Test the input parameters.
</span><span class="comment">*</span><span class="comment">
</span>      INFO = 0
      NOFACT = <a name="LSAME.214"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( FACT, <span class="string">'N'</span> )
      IF( .NOT.NOFACT .AND. .NOT.<a name="LSAME.215"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( FACT, <span class="string">'F'</span> ) ) THEN
         INFO = -1
      ELSE IF( .NOT.<a name="LSAME.217"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( UPLO, <span class="string">'U'</span> ) .AND. .NOT.<a name="LSAME.217"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( UPLO, <span class="string">'L'</span> ) )
     $          THEN
         INFO = -2
      ELSE IF( N.LT.0 ) THEN
         INFO = -3
      ELSE IF( NRHS.LT.0 ) THEN
         INFO = -4
      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
         INFO = -9
      ELSE IF( LDX.LT.MAX( 1, N ) ) THEN
         INFO = -11
      END IF
      IF( INFO.NE.0 ) THEN
         CALL <a name="XERBLA.230"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</a>( <span class="string">'<a name="CHPSVX.230"></a><a href="chpsvx.f.html#CHPSVX.1">CHPSVX</a>'</span>, -INFO )
         RETURN
      END IF
<span class="comment">*</span><span class="comment">
</span>      IF( NOFACT ) THEN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">        Compute the factorization A = U*D*U' or A = L*D*L'.
</span><span class="comment">*</span><span class="comment">
</span>         CALL CCOPY( N*( N+1 ) / 2, AP, 1, AFP, 1 )
         CALL <a name="CHPTRF.239"></a><a href="chptrf.f.html#CHPTRF.1">CHPTRF</a>( UPLO, N, AFP, IPIV, INFO )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">        Return if INFO is non-zero.
</span><span class="comment">*</span><span class="comment">
</span>         IF( INFO.GT.0 )THEN
            RCOND = ZERO
            RETURN
         END IF
      END IF
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     Compute the norm of the matrix A.
</span><span class="comment">*</span><span class="comment">
</span>      ANORM = <a name="CLANHP.251"></a><a href="clanhp.f.html#CLANHP.1">CLANHP</a>( <span class="string">'I'</span>, UPLO, N, AP, RWORK )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     Compute the reciprocal of the condition number of A.
</span><span class="comment">*</span><span class="comment">
</span>      CALL <a name="CHPCON.255"></a><a href="chpcon.f.html#CHPCON.1">CHPCON</a>( UPLO, N, AFP, IPIV, ANORM, RCOND, WORK, INFO )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     Compute the solution vectors X.
</span><span class="comment">*</span><span class="comment">
</span>      CALL <a name="CLACPY.259"></a><a href="clacpy.f.html#CLACPY.1">CLACPY</a>( <span class="string">'Full'</span>, N, NRHS, B, LDB, X, LDX )
      CALL <a name="CHPTRS.260"></a><a href="chptrs.f.html#CHPTRS.1">CHPTRS</a>( UPLO, N, NRHS, AFP, IPIV, X, LDX, INFO )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     Use iterative refinement to improve the computed solutions and
</span><span class="comment">*</span><span class="comment">     compute error bounds and backward error estimates for them.
</span><span class="comment">*</span><span class="comment">
</span>      CALL <a name="CHPRFS.265"></a><a href="chprfs.f.html#CHPRFS.1">CHPRFS</a>( UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X, LDX, FERR,
     $             BERR, WORK, RWORK, INFO )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     Set INFO = N+1 if the matrix is singular to working precision.
</span><span class="comment">*</span><span class="comment">
</span>      IF( RCOND.LT.<a name="SLAMCH.270"></a><a href="slamch.f.html#SLAMCH.1">SLAMCH</a>( <span class="string">'Epsilon'</span> ) )
     $   INFO = N + 1
<span class="comment">*</span><span class="comment">
</span>      RETURN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     End of <a name="CHPSVX.275"></a><a href="chpsvx.f.html#CHPSVX.1">CHPSVX</a>
</span><span class="comment">*</span><span class="comment">
</span>      END

</pre>

 </body>
</html>
